// import { arrayBuffer } from "stream/consumers"
let value1: any
console.log(value1.abc)

let value2: unknown

// console.log((value2 as string).trimEnd)
if (typeof value2 === 'string') {
  value2.length
}
function add (n1: number, n2:number):number {
  return n1 + n2
}
const obj = {
  add
}

function fn (n1: number, n2:number): boolean {
  return false
}

  // 获取fn函数的类型
  type Fn = typeof fn

  // 获取Fn函数的返回值类型
  type Res = ReturnType<Fn> // 鼠标悬浮查看提示

//   type Res1 = ReturnType<typeof Math.random>
  type Res1 = ReturnType<typeof Array.prototype.slice>

// const arr = []
// arr.splice()
export default obj
